
// 定义全局过滤器
import Vue from 'vue';

Vue.filter('formateDate', (date) => {
    let t = new Date(date)
    let y = t.getFullYear();
    let m = t.getMonth() + 1;
    let d = t.getDate();
    return `${y}-${m}-${d}`
})


Vue.filter('formateSource', (source) => {
    switch (source) {
        case '1':
            return "毕业生"
        case '2':
            return "朋友"
        case '3':
            return "同事"
        case '4':
            return "网络"
    }
})